package com.mz.common.utils;

import com.mz.common.dto.UserHolderDto;

public class UserHolder {

    private static final ThreadLocal<UserHolderDto> t1 = new ThreadLocal<>();

    public static void saveUser( UserHolderDto userHolderDto ){
        t1.set( userHolderDto );
    }

    public static UserHolderDto getUser(){
        return t1.get();
    }

    public static void clear(){
        t1.remove();
    }
}
